export const useLoginGuard = (): boolean => {
  const token = localStorage.getItem("isLogin")
  if (!token) {
    return false
  }
  const data = JSON.parse(token)
  const exp = data.rememberAccount === true ? 604800000 : 7200000
  if(new Date().getTime() - data.time >= exp){
    localStorage.removeItem("isLogin")
    return false
  }
  return true
}
